<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        body
        {
            perspective: 800px;
        }
        .cube
        {
            width: 200px;
            height: 200px;
            background-color: #bfa;
            margin: 100px auto;
            /*显示3D效果*/
            transform-style:preserve-3d;
            /*transform: rotateX(45deg) rotateZ(45deg);*/
            animation: roll 0.1s infinite linear;
        }
        .cube > div
        {
            width: 200px;
            height: 200px;
            /*为元素设置透明效果*/
            opacity: 0.7;
            position: absolute;
        }
        .box1
        {
            /*Z轴移动的时候，参照物是本身*/
            transform: rotateY(90deg) translateZ(100px);
        }
        .box2
        {
            transform: rotateY(-90deg) translateZ(100px);
        }
        .box3
        {
            transform: rotateX(90deg) translateZ(100px);
        }
        .box4
        {
            transform: rotateX(-90deg) translateZ(100px);
        }
        .box5
        {
            transform: rotateY(0deg) translateZ(100px);
        }
        .box6
        {
            transform: rotateY(180deg) translateZ(100px);
        }
        img
        {
            vertical-align: top;
        }

        @keyframes roll
        {
            from
            {
                transform: rotateX(0) rotateZ(0);
            }
            to
            {
                transform: rotateX(1turn) rotateZ(1turn);
            }
        }
    </style>
</head>
<body>
    <!--创建一个外部的容器-->
    <div class="cube">
        <div class="box1">
            <img src="../TestPicture/1.jpeg">
        </div>
        <div class="box2">
            <img src="../TestPicture/2.jpg">
        </div>
        <div class="box3">
            <img src="../TestPicture/3.jpg">
        </div>
        <div class="box4">
            <img src="../TestPicture/4.jpg">
        </div>
        <div class="box5">
            <img src="../TestPicture/5.jpg">
        </div>
        <div class="box6">
            <img src="../TestPicture/6.jpg">
        </div>
    </div>
</body>
</html>